home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / pascal / tch_tpas.zip / PROG15C.PAS < prev    next >
Pascal/Delphi Source File  |  1986-04-05  |  1KB  |  56 lines

  1. PROGRAM PROG15C;
  2. {$U+    Copyright (C), 1985 by Lyle Faurot.  All rights reserved.
  3.  
  4.     New Topics:  Screen messages
  5.                  Editing data entered
  6.  
  7. }
  8. TYPE
  9.   Name_Type = String[12];
  10.  
  11. VAR
  12.   F_Name    : String[12];
  13.  
  14. PROCEDURE Print_Entry_Screen;
  15.  
  16. BEGIN
  17.   ClrScr;
  18.   WriteLn('           PERSONAL DATA ENTRY SCREEN');
  19.   WriteLn;
  20.   WriteLn('First Name:');
  21.   WriteLn;
  22.   WriteLn(' Last Name:');
  23.   WriteLn;
  24.   WriteLn('  Phone No:');
  25. END;
  26.  
  27. FUNCTION OK(String_Entered : Name_Type) : Boolean;
  28.  
  29. VAR
  30.   Response : Char;
  31.  
  32. BEGIN
  33.   GotoXY(1,23);
  34.   Write('Is ', String_Entered, ' correct? (Y or N)  ');
  35.   ReadLn(Response);
  36.   IF (Response = 'y') OR (Response = 'Y')
  37.      THEN
  38.        OK := TRUE
  39.      ELSE
  40.        OK := FALSE;
  41. END;
  42.  
  43. PROCEDURE Get_First_Name(VAR First_Name : Name_Type);
  44.  
  45. BEGIN
  46.   REPEAT
  47.     GotoXY(13,3);
  48.     Read(First_Name);
  49.   UNTIL OK(First_Name);
  50. END;
  51.  
  52. BEGIN
  53.   Print_Entry_Screen;
  54.   Get_First_Name(F_Name);
  55. END.
  56.